<%@page import="com.alibaba.fastjson.JSONObject"%>
<%@page import="com.alibaba.fastjson.JSONArray"%>
<%@page import="com.alibaba.fastjson.JSON"%>
<%@page import="cn.pzhu.pojo.User"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>用户注册</title>
<script src="js/jquery-3.7.0.min.js"></script>
<style type="text/css">
	input[type="text"],input[type="password"]{
		width: 300px;
	}
</style>
<script type="text/javascript">
	function modify_password(){
		return true;
	}
</script>
</head>
<body>
<jsp:include page="/common.jsp"/>
<h1 class="title">修改密码</h1>
	<c:choose>
		<c:when test='${empty user}'>未接收到数据</c:when>
			<c:otherwise>
				<form action="modifypassword" method="post" onsubmit="modify_password()">
					<table style="margin:auto;">
						<tr>
							<td>
								<input type="hidden" name="username" value='${user.username}'>
							</td>
						</tr>
						<tr>
							<td>旧密码</td>
							<td>
								<input type="password" name="oldpassword" value=''>
							</td>
						</tr>
						<tr>
							<td>新密码</td>
							<td>
								<input type="password" name="newpassword" value=''>
							</td>
						</tr>
						<tr>
							<td>确认密码</td>
							<td>
								<input type="password" name="confirmpassword" value=''>
							</td>
						</tr>
						<tr>
							<td colspan='2' style="text-align:center">
								<input type="submit" value="保存修改"/>
								<input type="button" value="放弃修改" onclick="location.reload()"/>
							<td>
						</tr>
					</table>
				</form>
		</c:otherwise>
	</c:choose>
</body>
	
</html>